package cn.weisoft.nconv.mapper;

import cn.weisoft.nconv.model.Garden;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface GardenMapper extends BaseMapper<Garden>{

   /* @Insert("insert into garden(title,address,lng,lat,district_name,count) " +
            "values(#{title},#{address},#{lng},#{lat},#{district_name},#{count})")
    @Options(useGeneratedKeys = true,keyProperty = "id")
    int insertGarden(Garden garden);*/

/*
    @Select("select * from garden where id=#{id}")
    Garden getById(int id);*/

/*    @Delete("delete   from garden where id=#{id}")
    int deleteById(int id);*/

/*
    @Select("select * from garden")
    List<Garden>selectAllGarden();
*/

   /* @Select("select * " +
            " from garden " +
            " where lng between #{minLng} and #{maxLng} " +
            " and lat between #{minLat} and #{maxLat}")
    List<Garden>selectGardenByBnd(float minLng,float minLat,float maxLng,float maxLat);
*/

    @SelectProvider(type=GardenDynamicSqlProvider.class,method = "selectWithParam")
    List<Garden>selectWithParam(Map<String,Object> param);

    @SelectProvider(type=GardenDynamicSqlProvider.class,method = "countWithPara")
    int countWithPara(Map<String,Object> param);
}
